package com.eastfair.imaster.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 展商
 * </p>
 *
 * @author ligang
 * @since 2021-12-06
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("e_exhibitor")
@ApiModel(value = "Exhibitor", description = "展商")
@AllArgsConstructor
public class Exhibitor extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 项目ID
     */
    @ApiModelProperty(value = "项目ID")
    @NotNull(message = "请填写项目ID")
    @TableField(value = "project_id")
    @Excel(name = "项目ID")
    private Long projectId;

    /**
     * 当前发布到的展会ID
     */
    @ApiModelProperty(value = "当前发布到的展会ID")
    @TableField(value = "exhibition_id")
    @Excel(name = "当前发布到的展会ID")
    private Long exhibitionId;

    /**
     * 公司ID
     */
    @ApiModelProperty(value = "公司ID")
    @TableField(value = "company_id")
    @Excel(name = "公司ID")
    private Long companyId;

    /**
     * 展馆号
     */
    @ApiModelProperty(value = "展馆号")
    @Size(max = 255, message = "展馆号长度不能超过255")
    @TableField(value = "exhibition_floor", condition = LIKE)
    @Excel(name = "展馆号")
    private String exhibitionFloor;

    /**
     * 展位号
     */
    @ApiModelProperty(value = "展位号")
    @Size(max = 255, message = "展位号长度不能超过255")
    @TableField(value = "exhibition_booth_number", condition = LIKE)
    @Excel(name = "展位号")
    private String exhibitionBoothNumber;

    /**
     * 展位区域
     */
    @ApiModelProperty(value = "展位区域")
    @Size(max = 255, message = "展位区域长度不能超过255")
    @TableField(value = "exhibition_booth_part", condition = LIKE)
    @Excel(name = "展位区域")
    private String exhibitionBoothPart;

    /**
     * 参展次数
     */
    @ApiModelProperty(value = "参展次数")
    @TableField(value = "attend_times")
    @Excel(name = "参展次数")
    private Integer attendTimes;

    /**
     * 是否生效(默认1：可用 0:不可用)
     */
    @ApiModelProperty(value = "是否生效(默认1：可用 0:不可用)")
    @TableField(value = "is_enabled")
    @Excel(name = "是否生效(默认1：可用 0:不可用)")
    private Integer isEnabled;

    /**
     * 是否删除(默认0：未删除 1:已删除)
     */
    @ApiModelProperty(value = "是否删除(默认0：未删除 1:已删除)")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除(默认0：未删除 1:已删除)")
    private Integer isDeleted;

    /**
     * pv
     */
    @ApiModelProperty(value = "pv")
    @TableField(value = "page_view")
    @Excel(name = "pv")
    private Integer pageView;

    /**
     * uv
     */
    @ApiModelProperty(value = "uv")
    @TableField(value = "unique_visitor")
    @Excel(name = "uv")
    private Integer uniqueVisitor;

    /**
     * CN:中文  EN：英文
     */
    @ApiModelProperty(value = "CN:中文  EN：英文")
    @Size(max = 255, message = "CN:中文  EN：英文长度不能超过255")
    @TableField(value = "language_type", condition = LIKE)
    @Excel(name = "CN:中文  EN：英文")
    private String languageType;

    /**
     * 同步展商id
     */
    @ApiModelProperty(value = "同步展商id")
    @TableField(value = "sync_exhibitor_id")
    @Excel(name = "同步展商id")
    private Long syncExhibitorId;


    @Builder
    public Exhibitor(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Long projectId, Long exhibitionId, Long companyId, String exhibitionFloor, String exhibitionBoothNumber, 
                    String exhibitionBoothPart, Integer attendTimes, Integer isEnabled, Integer isDeleted, Integer pageView, Integer uniqueVisitor, 
                    String languageType, Long syncExhibitorId) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.projectId = projectId;
        this.exhibitionId = exhibitionId;
        this.companyId = companyId;
        this.exhibitionFloor = exhibitionFloor;
        this.exhibitionBoothNumber = exhibitionBoothNumber;
        this.exhibitionBoothPart = exhibitionBoothPart;
        this.attendTimes = attendTimes;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.pageView = pageView;
        this.uniqueVisitor = uniqueVisitor;
        this.languageType = languageType;
        this.syncExhibitorId = syncExhibitorId;
    }

}
